import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/global.css'
import './assets/fonts/iconfont.css'
import axios from 'axios'




//引入axions 并配置
Vue.prototype.$http = axios
//设置默认url根路径
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
//设置axios拦截
axios.interceptors.request.use(config => {
  //最后必须返回  return
  config.headers.Authorization = window.sessionStorage.getItem('token')
  console.log(config);  
  return config;
})
//关闭警告
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
